import java.security.Key;

abstract class Shape {
    int side;
    int high;
    int R;
    abstract public double area(int side,int high,int R);  //面积
    abstract public double perimeter(int side,int high,int R); //周长
    abstract public String getClassName();  //获取类的名称
}

class Circle extends Shape {

    @Override
    public double area(int side, int high, int R) {
        double sum = 3.14 * R * R;
        return sum;
    }

    @Override
    public double perimeter(int side, int high, int R) {
        double sum = 2 * 3.14 * R;
        return sum;
    }

    @Override
    public String getClassName() {
        return "圆形";
    }
}

class Square extends Shape {

    @Override
    public double area(int side, int high, int R) {
        return side+high;
    }

    @Override
    public double perimeter(int side, int high, int R) {
        return side*4;
    }

    @Override
    public String getClassName() {
        return "正方形";
    }
}

class Rectangle extends Shape {

    @Override
    public double area(int side, int high, int R) {
        return side*high;
    }

    @Override
    public double perimeter(int side, int high, int R) {
        return 2*(side+high);
    }

    @Override
    public String getClassName() {
        return "矩形";
    }
}
public class Test_2 {
    public static void main(String[] args) {
      Circle S1 = new Circle();
        double ret1,ret2;
        String ret3 = S1.getClassName();
        ret1 = S1.area(0,0,6);
        ret2 = S1.perimeter(0,0,6);
        ret3 = S1.getClassName();
        System.out.println("面积是："+ret1+" 周长是："+ret2+" 图形是："+ret3);

        Square S2 = new Square();
        ret1 = S2.area(8,8,0);
        ret2 = S2.perimeter(8,8,0);
        ret3 = S2.getClassName();
        System.out.println("面积是："+ret1+" 周长是："+ret2+" 图形是："+ret3);

        Rectangle S3 = new Rectangle();
        ret1 = S3.area(3,5,0);
        ret2 = S3.perimeter(3,5,0);
        ret3 = S3.getClassName();
        System.out.println("面积是："+ret1+" 周长是："+ret2+" 图形是："+ret3);
    }

}
